<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2018/1/12
 * Time: 23:10
 */

namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;

class QqconntectController extends Controller
{
    public function login()
    {
        return view("/auth/qqconntect/login");
    }

    public function index()
    {
        //require_once("../../API/qqConnectAPI.php");//不用引入已经自动加载
        $qc = new \QC();
        $qc->qq_login();

    }

    public function callback()
    {
        //require_once("../../API/qqConnectAPI.php");//不用引入已经自动加载
        $qc = new \QC();
        //$apikey = "101455944";
        $token = $qc->qq_callback();
        $openid = $qc->get_openid();
        echo $token;
        echo "<br/>";
        echo $openid;

        $qc1 = new \QC($token,$openid);
        $arr = $qc1->get_user_info();
        dd($arr);


        //判断返回的数据


    }

}